package com.flyme.excel.validator;

public class ValidateResult {
    public enum ResultEnum{
        PASS,
        NOT_PASS
    }

    public ResultEnum result;

    public String message;

    public ResultEnum getResult() {
        return result;
    }

    public void setResult(ResultEnum result) {
        this.result = result;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public static ValidateResult pass() {
        ValidateResult vRes = new ValidateResult();
        vRes.setResult(ResultEnum.PASS);
        return vRes;
    }

    public static ValidateResult notPass(String message) {
        ValidateResult vRes = new ValidateResult();
        vRes.setResult(ResultEnum.NOT_PASS);
        vRes.setMessage(message);
        return vRes;
    }

    public static boolean notPass(ResultEnum resultEnum) {
        return resultEnum.equals(ResultEnum.NOT_PASS);
    }
}
